<script language="javascript" type="text/javascript" src="../../../lib/My97DatePicker/WdatePicker.js"></script>
<div ng-controller="addLotteryCtrl
">
    <h4>添加抽奖活动</h4>

    <form class="form account-form">
        <label class="control-label">抽奖活动名称：</label>
        <input class="form-control" ng-model="activityName" required tabindex="5">
        <label class="control-label">参与活动小区：</label>
        <label class="radio-inline">
            <input type="radio" name="communityRadio" id="inlineRadio3" ng-click="showManyCommunity()" value="0" ng-model="chooseCommunity" ng-checked="true">多个
        </label>
        <label class="radio-inline">
            <input type="radio" name="communityRadio" id="inlineRadio4" ng-click="showOneCommunity()" value="1"  ng-model="chooseCommunity">单个
        </label><br /> <br />
        <table id="manyCommunity" style="width:500px;" border="0" >
            <tr align="center">
                <td >
                    <select id="communitys" multiple="multiple" ng-model="oneCommunity"
                            style="width: 200px;height:300px;">
                        <option ng-repeat="community in communityList.data" value="{{community.objId}}">{{community.communityName}}</option>
                    </select>
                </td>
                <td >
                    <input type="button" value=">>" id="addAllCommunity" ng-click="addAllCommunity()" /><br /><br />
                    <input type="button" value=">" id="addCommunity" ng-click="addCommunity()" /><br /><br />
                    <input type="button" value="<" id="removeCommunity" ng-click="removeCommunity()"/><br /><br />
                    <input type="button" value="<<" id="removeAllCommunity" ng-click="removeAllCommunity()"/>
                </td>
                <td>
                    <select id="selCommunitys" multiple="multiple"
                            style="width: 200px;height:300px;" ng-model="selCommunitys">

                    </select>
                </td>

            </tr>
        </table>
        <select id="community"
                style="width: 200px;height:300px;display:none;">
            <option ng-repeat="community in communityList.data" value="{{community.objId}}">{{community.communityName}}</option>
        </select><br /><br />
        <label class="control-label">摇奖次数(次/人)：</label>
        <input class="form-control" ng-model="limitCount" required tabindex="5">
        <label class="control-label">活动描述：</label><br />
        <textarea style="width:600px;height:200px;" ng-model="activityDesc" required tabindex="5"></textarea>
        <br /><br />
        <label class="control-label">规则描述：</label><br />
        <textarea style="width:600px;height:200px;" ng-model="ruleDesc" required tabindex="5"></textarea>
        <br /><br />
        <label class="control-label">开始时间：</label>
        <input type="text" id="activityBeginTime"  class="Wdate"  onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'%y-%M-%d'})" >
        <label class="control-label">结束时间：</label>
        <input type="text" id="endTime"  class="Wdate"  onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'%y-%M-%d'})" >
        <br /><br />
        <!--<label class="control-label">是否发布：</label>-->
        <!--<label class="radio-inline">-->
        <input type="hidden" name="inlineRadioOptions"  ng-model="isPublish" value="1">
        <!--</label>-->
        <!--<label class="radio-inline">-->
            <!--<input type="radio" name="inlineRadioOptions" id="inlineRadio2" ng-model="isPublish" value="0">否-->
        <!--</label>-->
        <br /><br />
        <div class="form-group">
            <button ng-click="cannel()" class="btn btn-xs btn-primary">取消</button>
            <button ng-click="add()" class="btn btn-xs btn-primary" type="submit">保存</button>
        </div>
    </form>
</div>

